home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 1 / ETO Development Tools 1.iso / Essentials / Developer Essentials Jul 90 / Programming / MPW Interfaces & Libraries 3.1 / AIncludes / PrPrivate.a < prev    next >
Encoding:
Text File  |  1989-10-13  |  9.3 KB  |  236 lines  |  [TEXT/MPS ]

  1. ; Version: 1.02
  2. ; Created: Tuesday, August 2, 1988 at 9:45:07 PM
  3. ;
  4. ; File: PrPrivate (Owned and maintained soley by the Print Shop)
  5. ; Copyright © 1984, 1985, 1986 Apple Computer, Inc.
  6. ;
  7. ;
  8. ; Printing Equates -- This file supplements the high-level equates for the
  9. ; Macintosh printing software in PrEqu. These equates are private
  10. ; to Apple Computer, Inc. and should be used solely for building system
  11. ; software such as Apple printer drivers. The lines commented out
  12. ; reflect equates which appear in PrEqu and are included here just for
  13. ; convenience.
  14. ;
  15. ;_______________________________________________________________________
  16.  
  17. ; Printing Code Constants
  18.  
  19. ; These are the PrDrvr constants.
  20.  
  21. lPrLFSixth        EQU         -1                        ; The PrDevCtl Proc's CParam for 1/6 th inch paper advance
  22. lPrLFEighth     EQU         -2                        ; The PrDevCtl Proc's CParam for 1/8 th inch paper advance
  23. iPrDocOpen        EQU         1                        ; The PrDevCtl Proc's CParam for doc begin
  24. iPrPageClose    EQU         2                        ; The PrDevCtl Proc's CParam for page end
  25. ;iPrLineFeed equ 3 ; The PrDevCtl Proc's CParam for paper advance
  26. iPrPageOpen     EQU         4                        ; The PrDevCtl Proc's CParam for page begin
  27. iPrDocClose     EQU         5                        ; The PrDevCtl Proc's CParam for doc end
  28. iPrLFStd        EQU         -1                        ; The PrDevCtl Proc's CParam for std paper advance
  29. iMscCtl         EQU         9                        ; Msc Text state / Drvr State ctl number
  30. iPvtCtl         EQU         10                        ; Private Ctls start here
  31.  
  32. ; State Constants
  33.  
  34. bPrDevOpen        EQU         1                        ; The DevOpen State Indicator
  35. bPrDocOpen        EQU         2                        ; The DocOpen State Indicator
  36. bPrPageOpen     EQU         3                        ; The PageOpen State Indicator
  37. bPrPrinting     EQU         4                        ; The Printing State Indicator
  38. bPrPageClose    EQU         5                        ; The PageClose State Indicator
  39. bPrDocClose     EQU         6                        ; The DocClose State Indicator
  40. bPrDevClose     EQU         0                        ; The DevClose State Indicator
  41.  
  42. ; These are misc Alert & Dialog constants
  43.  
  44. iOK             EQU         1                        ; OK Button
  45. iCancel         EQU         2                        ; Cancel Button
  46. iPrStlDlg        EQU         $E000                    ; {-8192} Style Dialog
  47. iPrJobDlg        EQU         $E001                    ; {-8191} Job Dialog
  48. iPrCfgDlg        EQU         $E002                    ; {-8190} Configuration Dialog
  49. iPgFeedAx        EQU         $E00A                    ; {-8182} Page Feed Dialog
  50. iPicSizAx        EQU         $E00B                    ; {-8181} Pic Size Alert
  51. iIOAbrtAx        EQU         $E00C                    ; {-8180} IO Timeout Alert
  52. iPrPgFst        EQU         1
  53. iPrPgMax        EQU         9999
  54. iPrSavPFil        EQU         $FFFF                    ; Abort but save print file
  55.  
  56. ; Printing data structures
  57.  
  58. ; Print Info data structure
  59. ; The parameters needed for page composition.
  60.  
  61.  
  62. ;iDev already defined in PrEqu.a
  63. ;iDev EQU 0 ; Font mgr/QuickDraw device code [word]
  64.  
  65. iVRes            EQU         2                        ; V Resolution of device, in device coord.[word]
  66. iHRes            EQU         4                        ; H resolution [word]
  67. iPrInfoSize     EQU         14                        ; The PrInfo size.[14]
  68.  
  69.  
  70. ; Printer Style data structure
  71. ; The printer configuration and usage information.
  72.  
  73. ;wDev EQU 0 ; The drvr #, Hi byte=RefNum, Lo byte=variant [word]
  74. bPort            EQU         6                        ; The IO port number [byte]
  75. iPrStlSize        EQU         8                        ; The PrStl size.[8]
  76.  
  77.  
  78. ; Print eXtra Info data structure
  79. ; The print time eXtra information.
  80.  
  81. iRowBytes        EQU         0                        ; The Band's rowBytes. [word]
  82. iBandV            EQU         2                        ; V Size of band, in device coordinates [word]
  83. iBandH            EQU         4                        ; H size of band [word]
  84. iBands            EQU         8                        ; Number of bands per page.
  85. bPatScale        EQU         10                        ; Pattern scaling [byte]
  86. bULThick        EQU         11                        ; 3 Underscoring parameters [byte]
  87. bULOffset        EQU         12                        ; [byte]
  88. bULShadow        EQU         13                        ; [byte]
  89. scan            EQU         14                        ; Band scan direction [byte]
  90. bXInfoX         EQU         15                        ; An eXtra byte. [byte]
  91. iPrXInfoSize    EQU         16                        ; The PrXInfo size.[16 bytes]
  92.  
  93.  
  94. ; Print Job data structure
  95. ; Print "form" for a single print request.
  96.  
  97. ;iFstPage EQU 0 ; Page Range [word]
  98. ;iLstPage EQU 2 ; [word]
  99. ;iCopies EQU 4 ; # copies [word]
  100. ;bJDocLoop EQU 6 ; Draft quality print flag [byte]
  101. ;fFromApp EQU 7 ; Printing from an App (not PrApp) flag [byte]
  102. ;pIdleProc EQU 8 ; Idle Proc [pointer]
  103. ;pFileName EQU 12 ; Spool File Name: NIL for default [pointer]
  104. ;iFileVol EQU 16 ; Spool File vol [word]
  105. ;bFileVers EQU 18 ; Spool File version [byte]
  106. bJobX            EQU         19                        ; An eXtra byte [byte]
  107. ;iPrJobSize EQU 20 ; The PrJob size.[20]
  108.  
  109.  
  110. ; Print Port structure
  111. ; A graf port, its procs, plus some extra.
  112.  
  113. ;gPort EQU 0 ; The Printer's graf port
  114. gProcs            EQU         108                     ; ..and its procs [13 pointers]
  115. lGParam1        EQU         160                     ; Some params: Our relocatable stuff etc [long]
  116. lGParam2        EQU         164                     ; [long]
  117. lGParam3        EQU         168                     ; [long]
  118. lGParam4        EQU         172                     ; [long]
  119. fOurPtr         EQU         176                     ; PrPort allocation done by us? [byte]
  120. fOurBits        EQU         177                     ; BitMap allocation done by us? [byte]
  121. ;iPrPortSize EQU 178 ; The PrPort size.[178]
  122.  
  123.  
  124. ; Print Status data structure
  125.  
  126. ;iTotPages EQU 0 ; Total pages in Print File [word]
  127. ;iCurPage EQU 2 ; Current page number [word]
  128. ;iTotCopies EQU 4 ; Total copies requested [word]
  129. ;iCurCopy EQU 6 ; Current copy number [word]
  130. ;iTotBands EQU 8 ; Total bands per page [word]
  131. ;iCurBand EQU 10 ; Current band number [word]
  132. ;fPgDirty EQU 12 ; current page has been written to? [byte]
  133. ;fImaging EQU 13 ; in band's DrawPic call? [byte]
  134. ;hPrint EQU 14 ; active Printer record [handle]
  135. ;pPrPort EQU 18 ; active PrPort [pointer]
  136. hPic            EQU         22                        ; active Picture [handle]
  137. ;iPrStatSize EQU 26 ; The PrStatus size[26 bytes]
  138.  
  139.  
  140. ; Print dialog
  141.  
  142. dlg             EQU         0                        ; DialogWindow
  143. pFltrProc        EQU         170                     ; filter Proc [pointer]
  144. pItemProc        EQU         174                     ; item evaluating proc [pointer]
  145. hPrintUsr        EQU         178                     ; user's print record [handle]
  146. fDoIt            EQU         182                     ; Boolean
  147. fDone            EQU         183                     ; Boolean
  148. lPrDlg1         EQU         184                     ; users to hang global data [long]
  149. lPrDlg2         EQU         188                     ; [long]
  150. lPrDlg3         EQU         192                     ; [long]
  151. lPrDlg4         EQU         196                     ; [long]
  152. iPrDlgSz        EQU         200
  153.  
  154.  
  155.  
  156. ; Less common print code stuff
  157.  
  158. ; These are the definitions for the Print code
  159.  
  160. fPrDbgOK        EQU         1                        ; Debug enable
  161. iPrSystemError    EQU         29                        ; Printcode System Error
  162.  
  163. ; The Private Print Globals; 16 bytes located at [SysEqu] PrintVars
  164.  
  165. PrintVars        EQU         $944                    ; print code variables [16 bytes]
  166. PrintErr        EQU         $944                    ; Current Printer Error
  167. ;ChooserBits EQU $946 ; bit 7 = 0 don't run; bit 6 = 0 gray out AppleTalk
  168. iPrErr            EQU         0                        ; Offset to current print error. Set to iPrAbort to abort printing.
  169. bDocLoop        EQU         2                        ; The Doc style: Draft, Spool, .., and ..
  170. ; Currently use low 2 bits; the upper 6 are for flags.
  171. bUser1            EQU         3
  172. lUser1            EQU         4
  173. lUser2            EQU         8
  174. lUser3            EQU         12
  175. iPrResFileRefNum  EQU        14                        ; The current print driver's resource file refnum 
  176. iPrVarSize        EQU         16                        ; The PrVar's size.[16]
  177. iPrError        EQU         PrintVars+iPrErr        ; abs loc of PrintError
  178. bPrFlags        EQU         PrintVars+bDocLoop        ; abs loc of pr flags
  179. bPrType         EQU         PrintVars+bUser1        ; abs loc of pr type field = -bDev [default = imagewriter = FF]
  180. fNewRunBit        EQU         2                        ; Bit 2 (3rd bit) in bDocLoop: new JobRun indicator
  181. fHiResOK        EQU         3                        ; Bit 3 (4th bit) is hi res indicator for paint
  182. fWeOpenedRF     EQU         4                        ; Bit 4 (5th bit) is set if driver opend the prres file.
  183. iPrRefNum        EQU         PrintVars+iPrResFileRefNum
  184.                                                         ; abs loc of the current print driver's resource file refnum
  185.  
  186. ; Printer Type Constants (each new printer has its own index value)
  187.  
  188. bDevCItoh        EQU         1                        ; Imagewriter
  189. bDevDaisy        EQU         2                        ; Daisy wheel printer (scrapped)
  190. bDevLaser        EQU         3                        ; LaserWriter
  191.  
  192. ; Miscellaneous constants.
  193.  
  194. scanTB            EQU         0                        ; scan top-bottom
  195. scanBT            EQU         1                        ; scan bottom-top
  196. scanLR            EQU         2                        ; scan left-right
  197. scanRL            EQU         3                        ; scan right-left
  198.  
  199. ;-------------------------------------------------------------------------------
  200. ; These are the constants for using resources to swap in the non-driver
  201. ; print code. Three numbers are needed:
  202. ; ResType
  203. ; ResID
  204. ; Offset into the seg's jump table
  205. ;
  206. ; The offset is really a formatted Long that contains three fields:
  207. ; Frame Size; Unlock flag; Offset into the seg's jump table
  208. ; We could use the topmost byte for further stuff: a stack adjust for
  209. ; storing the registers needed by the link code so that it would be re-entrant.
  210. ;-------------------------------------------------------------------------------
  211.  
  212. lPDefType        EQU         $50444546                ; Pr Resource TYPE: "PDEF"
  213. iPrDraftID        EQU         0                        ; Pr Draft Resource ID
  214. iPrSpoolID        EQU         1                        ; Pr Spool Resource ID
  215. iPrUser1ID        EQU         2                        ; Pr Spare1 Resource ID
  216. iPrUser2ID        EQU         3                        ; Pr Spare2 Resource ID
  217. lOpenDoc        EQU         $000C0000                ; PrOpenDoc JumpTable offset
  218. lCloseDoc        EQU         $00048004                ; PrCloseDoc JumpTable offset
  219. lOpenPage        EQU         $00080008                ; PrOpenPage JumpTable offset
  220. lClosePage        EQU         $0004000C                ; PrClosePage JumpTable offset
  221. iPrDlgsID        EQU         4                        ; Pr Dialogs Resource ID
  222. lDefault        EQU         $00048000                ; PrintDefault JumpTable offset
  223. lStlDialog        EQU         $00048004                ; PrStlDialog JumpTable offset
  224. lJobDialog        EQU         $00048008                ; PrJobDialog JumpTable offset
  225. lStlInit        EQU         $0004000C                ; PrStlInit JumpTable offset
  226. lJobInit        EQU         $00040010                ; PrJobInit JumpTable offset
  227. lDlgMain        EQU         $00088014                ; PrDlgMain JumpTable offset
  228. lPrValidate     EQU         $00048018                ; PrintValidate JumpTable offset
  229. lPrJobMerge     EQU         $0008801C                ; PrintValidate JumpTable offset
  230. iPrPicID        EQU         5                        ; Pic Printing Resource ID
  231. lPrPicFile        EQU         $00148000                ; PrPicFile JumpTable offset
  232. iCfgDlgID        EQU         6                        ; Configuration proc Resource ID
  233. lCfgDialog        EQU         $00008000                ; PrCfgDialog JumpTable offset
  234. iPrHackID        EQU         7                        ; The "Oops, I Forgot" Resource ID
  235. lPrHack         EQU         $000C8000                ; PrHack JumpTable offset
  236.